from enum import Enum


class GenType(Enum):
    init = "init"
    http = "http"
    rpc = "rpc"
    idl = "idl"
    db = "db"


class RType(Enum):
    """
    返回数据类型：
        - raw: request请求原始信息
        - obj: 自定义结构体
        - json: json格式
    """
    raw = "raw"
    obj = "object"
    json = "json"


class ConfigType(Enum):
    ini = 'ini'
    yaml = 'yaml'
    toml = 'toml'


class HTTPEventHooksEnum(Enum):
    REQUEST = "request"
    RESPONSE = "response"


class Method(Enum):
    GET = "GET"
    POST = "POST"
    PUT = "PUT"
    DELETE = "DELETE"
    OPTIONS = "OPTIONS"
    HEAD = "HEAD"
    TRACE = "TRACE"
    PATCH = "PATCH"


class IP(Enum):
    IPv4 = 4
    IPv6 = 6


class RuleType(Enum):
    regex = "regex"
    keywords = "keywords"
    tables = "tables"


class IDC(Enum):
    BOE = "boe"
    PROD = "prod"
    LQ = "lq"
    HL = "hl"
    LF = "lf"
    SINF = "sinf"
    SINFBOE = "sinfboe"
    SINFONLINE = "sinfonline"
    SINFONLINEA = "sinfonlinea"
    SINFONLINEC = "sinfonlinec"


class Env(Enum):
    Online = 'online'
    Pre = 'pre'
    BOE = 'boe'
    Dev = 'dev'
